<div id="registerRegion" class="center">
    <div>
        <img src="/img/bailehui.png" alt=""/>
    </div>
    <form name="registerForm" novalidate style="margin-top: 50px;">
        <div class="form-group">
            <input type="text" class="form-control" name="username" ng-model="reg.username" placeholder="用户名" required>
            <div class="error" ng-show="registerForm.username.$dirty && registerForm.username.$invalid">
                <div ng-show="registerForm.username.$error.required">请输入用户名！</div>
            </div>
        </div>
        <div class="form-group">
            <input type="text" class="form-control" name="nickname" ng-model="reg.nickname" placeholder="昵称" required>
            <div class="error" ng-show="registerForm.nickname.$dirty && registerForm.nickname.$invalid">
                <div ng-show="registerForm.nickname.$error.required">请输入昵称！</div>
            </div>
        </div>
        <div class="form-group">
            <input type="password" class="form-control" name="password" ng-model="reg.password" placeholder="密码" required>
            <div class="error" ng-show="registerForm.password.$dirty && registerForm.password.$invalid">
                <div  ng-show="registerForm.password.$error.required">请输入密码！</div>
            </div>
        </div>
        <div class="form-group">
            <input type="password" class="form-control" name="checkpwd" ng-model="reg.checkpwd" placeholder="校验密码" required  match="reg.password">
            <div class="error" ng-show="registerForm.checkpwd.$dirty && registerForm.checkpwd.$invalid">
                <div ng-show="registerForm.checkpwd.$error.required">请再次输入密码！</div>
                <div ng-show="registerForm.checkpwd.$error.match">对不起，两次输入的密码不相等！</div>
            </div>
        </div>
        <button type="button" class="btn btn-default" ng-disabled="registerForm.$invalid"  ng-click="reg.register()">注册</button>
        <a ui-sref="login" class="btn btn-primary" >已经有账号，我要登录</a>
    </form>
</div>